﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Poll.aspx.vb" Inherits="helzwebscripting.Poll" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1 class="bigHeadings">The Ultimate Twilighters Poll</h1><br />
    <div class="poll_div">
    <span class="headings">Choose your allegiance!</span>
    <span class="listviewLabel">
        <br />
        <br />
    <asp:RadioButtonList ID="rbl_poll" runat="server" CssClass="poll" 
            RepeatDirection="Horizontal" >
        <asp:ListItem> Team Edward</asp:ListItem>
        <asp:ListItem> Team Jacob</asp:ListItem>
    </asp:RadioButtonList>
        <br />
    <asp:Button ID="btn_poll" runat="server" Text="Vote!" CssClass="addBtn" />
    </span>
    <br /><br />

<%--GRIDVIEW FOR RESULTS--%>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="teamVotesDS" CssClass="commentsGV">
            <Columns>
                <asp:BoundField DataField="Team" HeaderText="Team" SortExpression="Team" />
                <asp:BoundField DataField="TeamVotes" HeaderText="Total Votes" 
                    SortExpression="TeamVotes" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="teamVotesDS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
            ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
            SelectCommand="SELECT [Team], [TeamVotes] FROM [PollVotesView]">
        </asp:SqlDataSource>

        <br /><br />
    <asp:Image ID="poll_img" runat="server" ImageUrl="~/Pictures/Design/jacob-edward.jpg" />

        <br />
        <br />
        <br />

    </div>
</asp:Content>
